﻿using System.Collections.Generic;
using NUnit.Framework;

namespace OpenWaves.UnitTests
{
    [TestFixture]
    public class UrlBuilderTests
    {
        [Test]
        public void TestUrlBuilderCreatesValidUrl()
        {

            var url = AbsoluteUrl.Http("onet.pl")
                .SetPath(UrlPath.Absolute("artykuly", "nowe"))
                .AddParameter("user", "maciek")
                .AddParameter("page", 1)
                .ToUrl();

            Assert.That("http://onet.pl/artykuly/nowe?page=1&user=maciek", Is.EqualTo(url.ToString()));
        }
    }
}